package com.ffsky.template.demo.span;

import android.os.Parcel;
import android.text.TextPaint;
import android.text.style.URLSpan;

import androidx.annotation.NonNull;

public class LinkSpan extends URLSpan {
    private  int mColor;
    public LinkSpan(String url, int color) {
        super(url);
        this.mColor = color;
    }

    public LinkSpan(@NonNull Parcel src) {
        super(src);
    }

    @Override
    public void updateDrawState(@NonNull TextPaint ds) {
//        super.updateDrawState(ds);
        ds.setColor(mColor);
    }
}

